﻿package core.ui
{
    import flash.display.*;
    import flash.filters.*;
    import flash.geom.*;

    public class Marker extends Bitmap
    {
        public var origin:Point;
        public var offset:Point;

        public function Marker()
        {
            var _loc_1:int = -40;
            this.y = -40;
            this.x = _loc_1;
            this.bitmapData = new OriginCursor();
            this.filters = [new GlowFilter(16777215, 0.8, 3, 3, 5, 1, false)];
            return;
        }// end function

        public function SetOrigin(flash.filters:Point) : void
        {
            this.origin = flash.filters;
            this.offset = null;
            return;
        }// end function

        public function SetOffset(flash.filters:Point) : void
        {
            this.offset = new Point(this.origin.x - flash.filters.x, this.origin.y - flash.filters.y);
            return;
        }// end function

        public function Trace(flash.filters:Number) : void
        {
            this.x = stage.mouseX + this.offset.x * flash.filters + -8;
            this.y = stage.mouseY + this.offset.y * flash.filters + -7;
            return;
        }// end function

        public function Hide() : void
        {
            var _loc_1:int = -40;
            this.x = -40;
            this.y = _loc_1;
            return;
        }// end function

    }
}
